﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv-se" lang="sv-se">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
    <title>Alla filmer sorterade efter produktionsår</title>
</head>
<body>
	<h2>Alla filmer sorterade efter produktionsår</h2>
	<?php 
		require("DbSettings.php");
		$conn = mysql_connect($server, $username, $password);
		mysql_select_db($db, $conn);		
		
		$sql = "SELECT Title, ProductionYear FROM movie ORDER BY ProductionYear";
		
		$movies = mysql_query($sql);
		
		while($row = mysql_fetch_object($movies)) {
			echo '<div class="row"><span class="productionYear">' . $row->ProductionYear . '</span> <span class="title">' . $row->Title . '</span></div>';
		}
		
		mysql_close($conn);
		?>
		<br/><a href="index.htm">Startsidan</a>
</body>
</html>
